package com.hw.one.peach.core.service;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;

import com.hw.one.core.auth.context.SystemContextHolder;
import com.hw.one.core.result.MsgResult;
import com.hw.one.core.service.PageService;
import com.hw.one.peach.core.dao.IEncircledAreaDao;
import com.hw.one.peach.core.dao.IMapPointDao;
import com.hw.one.peach.core.service.IMapPointService;
import com.hw.one.util.DateTimeUtil;
import com.hw.one.util.UUIDUtil;

/**
  * @author  sjd 
  * @date 创建时间：2017年7月28日 下午3:14:23 
  * @version 1.0.0
  */
@Service(value = "mapPointService")
public class MapPointService extends PageService implements IMapPointService {

	@Resource
	private IMapPointDao mapPointDao;
	
	@Resource
	private IEncircledAreaDao encircledAreaDao;
	
	
	
	
	@Override
	public List<Map<String, Object>> retrievePointInfos(Map<String, Object> map) {
		
		List<Map<String, Object>> pointList = mapPointDao.retrievePointInfos(map);
		
		return pointList;
	}
	

	@Override
	public MsgResult deletes(Map<String, Object> map) {
		mapPointDao.deletes(map);
		return MsgResult.okResult();
	}


	@Override
	public MsgResult getById(String id) {
		
		Map<String, Object> mapPointMap = mapPointDao.getById(id);
		return MsgResult.okResult(mapPointMap);
		
	}


	@Override
	public MsgResult add(Map<String, Object> map) {
	
		 mapPointDao.add(map);
		return MsgResult.okResult();
	}


	@Override
	public MsgResult edit(Map<String, Object> map) {
		 mapPointDao.edit(map);
		return MsgResult.okResult();
	}


	@Override
	public MsgResult delete(String id) {
		
		 mapPointDao.delete(id);
		return MsgResult.okResult();
	}

}
